#include "GameBGLayer.h"


GameBGLayer::GameBGLayer(void)
{
	_imagePath = NULL;
	_image = NULL;
}


GameBGLayer::~GameBGLayer(void)
{
}


bool GameBGLayer::init()
{
	bool bRet = false;
	do 
	{
		CC_BREAK_IF(! CCLayer::init());
		if (_imagePath == NULL)
		{
			_imagePath = "bg.png";
		}
		CCSprite * _image = CCSprite::create(_imagePath);
		this->addChild(_image);
		bRet = true;
	} while (0);
	return bRet;
}


void GameBGLayer::updateImagePath(char * imagePath)
{
	_imagePath = imagePath;

	_image->initWithFile(_imagePath);
}
